home *** CD-ROM | disk | FTP | other *** search
/ LSD Docs / LSD Docs.iso / FILEZ / lsdph&ph.dms / lsdph&ph.adf / HackingVAX.txt.pp / HackingVAX.txt
Text File  |  1990-09-07  |  6KB  |  152 lines

  1.                _____________________________
  2.               /                             \
  3.               |       Inside Vax/Vms        |
  4.               |   Using Command Procedures  |
  5.               |                             |
  6.               |            By               |
  7.               |       Master Blaster        |
  8.               \_____________________________/
  9.               Advanced Telecommunications Inc.
  10.  
  11. Note: The following is geared for the more advanvced hacker.
  12.  
  13.      Part 1: Using Command Procedures.
  14.              ----- ------- ----------
  15.      You  can  use  command procedures to automate  sequences  of
  16. commands that you use quite often.  For example,  if you  always
  17. use  the  DIRECTORY command after you move to  a  Sub-Directory
  18. where  work  files  are  kept,  you can write  a  simple  command
  19. procedure to issue the SET DEFAULT and DIRECTORY commands for you.
  20. the following example, GO_DIR.COM, contains two commands:
  21. $ Set Default [perry.accounts]
  22. $ directory
  23. Instead of using each command alone,  you can execute  GO_DIR.COM
  24. with the @ command:
  25. $ @Go_Dir
  26.  
  27. this  command tells the DCL command interpreter to read the  file
  28. GO_DIR.COM and executes the commands in the file.   So the command
  29. interpreter  sets  your  default  directory  to[PERRY.ACCOUNTS]  and
  30. issues the DIRECTORY command.
  31.  
  32. note: DCL means Digital Command Language. (sorry)
  33.  
  34. Formatting Command Procedures
  35. ---------- ------- ----------
  36.     Use  the  DCL command CREATE to create and format a  command
  37. procedure.   When you name the command procedure,  use the default
  38. file type COM. If you use this default, you don't have to use the
  39. file type when you execute the procedure with the @ command.
  40. Command  procedures  contain DCL commands that you want  the  DCL
  41. command  intepreter  to execute and data lines that are  used  by
  42. these commands.  Commands must begin with a dollar sign.  You can
  43. start the command string just  after the dollar sign.
  44. Data lines do not start with a dollar sign.  Data lines are  used
  45. as  input  data for commands.   Data lines are used by  the  most
  46. recently issued command.
  47.  
  48. the  following  example shows command and data lines in a  command
  49. rocedure.
  50. $ mail
  51. SEND
  52. THOMAS
  53. MY MEMO
  54. did you get my memo?
  55.  
  56.  Show users thomas
  57. The first line is a command and must start with a "$".   The next
  58. lines  are data lines that are used by the mail  function;  these
  59. lines must not start with "$".
  60.  
  61. Using Multiple Lines for One Command
  62. ----- -------- ----- --- --- -------
  63.  
  64.     If  you are writing a command that includes many  qua|ifers,
  65. ou  can make the command procedure more readable by |isting  the
  66. qualifers on seperate lines rather than running them  together.  To
  67. do this, use the hyphen as a continuation character.  Don't start
  68. the continued line with "$". For example:
  69. $ print test.out -
  70.           /after=18:00 -
  71.          /copies=10 -
  72.          /queue=lpb0:
  73.  
  74. Executing Command Procedures
  75. -------- ------- ----------
  76.     You can execute command procedures in two modes: interactive
  77. and batch.   In  interactive mode,  the commands in the  command
  78. procedure are executing as if you were typing them.   You  cannot
  79. execute  any other commands from your computer.   In batch  mode,
  80. the   system  creates  a  seprate  process  to  run  the  command
  81. procedure.   After  you use a batch job you  can continue to  use
  82. the system while it executes.
  83.  
  84. Executing Command Procedures Interactively
  85. -------- -------- ---------- -------------
  86.      To  execute a command procedure interactively,  type the "@"
  87. command followed by the file specifications.  If you don't enter
  88. the entire command specification, the system will use the current
  89. disk, directory, and file default.
  90.  
  91. Changing Command Levels
  92. -------- ------- ------
  93.      A  command  level  is the DCL level  from  which  you  issue
  94. commands.   When  you log in and type commands at your  Computer,
  95. you  are issuing commands at your level zero.   If you execute  a
  96. procedure,  the commands in the procedure are executed at command
  97. level  1.   When the procedure ends and the DCL prompt is on your
  98. screen, you are back at levil zero.
  99.  
  100. A System Login File
  101. - ------ ----- ----
  102.      If  a system login fi|e exists,  it is executed  before  the
  103. personal  file.   When  the system login file  ends,  control  is
  104. passed to the personal login file.  System and group login files
  105. allow  a  system manager to make sure certian files are  executed
  106. when a person logs in.
  107. To make a system login file, you have to have a managers account,
  108. you use the name SYS$SYLOGIN to make the login file.
  109.  
  110. Personal Login Files
  111. ------- ----- -----
  112.     After  executing a system or group login  file,  the  system
  113. executes  a  personal login file.   Use a personal login file  to
  114. execute  gommands  that  you  want to  that  you  want  to  issue
  115. everytime you login.  Name the login command procedure LOGIN.COM
  116. and put it in the default login directory.
  117.  
  118. Defining Parameters or Qualifers
  119. --------- ---------- -- ---------
  120.      You  can  create  a command procedure  that  specifies  only
  121. parameters and(or)  qualifers and then use the command  procedure
  122. then a DCL command string.   This type of command procedure  is
  123. useful  when there is a set of parameters or qualifiers that  you
  124. requently use with one or more particular commands.   To execute
  125. the command string where you would normally use the qualifiers or
  126. parameters.
  127. For  example:  You could greate a command procedure that contains
  128. these qualifiers.
  129. /DEBUG/SYMBOL_TABLE/MAP/FULL/CROSS_REFERENCE
  130.  
  131. To  use this command procedure,  execute it on the  command  line
  132. where you would otherwise place qualifiers.   For example, if you
  133. name  the  command  procedure  DEFLINK.COM,  you  would  use  the
  134. following   command  line  to  link  to  an  object  module  name
  135. SYNAPSE.OBJ with the qualifiers that you specified in the  command
  136. procedure:
  137. $ LINK SYNAPSE@DEFLINK
  138.  
  139. The  next  example shows a command procedure named PARM.COM  that
  140. contains parameters:
  141. CHAP1, CHAP2
  142. To execute the procedure, use it in a command string in place of a
  143. parameter name:
  144. $ DIRECTORY @PARAM
  145.  
  146. As  the others in this set are completed, they should stay in  a
  147. group.
  148. ________________________________________________
  149.                                                 \
  150. H)ackRite 1986 - Advanced Telecommunications Inc.
  151. ________________________________________________/
  152.